import requests 
import sys 
future_code = 'C0' 
url_str = ('http://stock2.finance.sina.com.cn/futures/api/json.php/IndexService.getInnerFuturesDailyKLine?symbol=' + future_code + '&startdate=2019-01-22&enddate=2019-01-22') 
r = requests.get(url_str) 
r_json = r.json() 
r_lists = list(r_json) 
print('date,open,high,low,close,vol,code') 
for r_list in r_lists: 
    for v in r_list: 
        print(v + ',',end='') 
    print(future_code) 
